home *** CD-ROM | disk | FTP | other *** search
- /******************************************************************
- * TEXTRA AREXX script -- Mike Haas, 1991, All Rights Reserved. *
- * Freely distributable ONLY as a component of the TEXTRA package. *
- * This banner may not be removed or altered (improvements to the *
- * actual program welcome). Please document and send to me. *
- * !!! PLACE THIS FILE IN YOUR REXX: DIRECTORY !!! *
- ******************************************************************/
-
- /* Usage: DelToEnd
- *
- * This script accepts no parameters, and simply deletes to the end of the
- * current line from the current cursor position. If a select range exists,
- * deletion starts at the beginning of the selection.
- *
- * If the select is greater than one line, it presents a notification
- * requester.
- *
- */
-
- options results
-
- get cursor position
-
- if (result ~= SELECT) then do
- parse var result xstart' 'ystart
- end
- else do
- get select position
- parse var result xstart' 'ystart' 'xend' 'yend
- if (ystart ~= yend) then
- if ((xend ~= 0) | ((yend-ystart) > 1)) then do
- notify '"Only 1 selected line allowed for DelToEnd script."'
- exit
- end
- end
-
- eol
- get cursor position
- parse var result xeol' 'yeol
- if (xeol ~= xstart) then do
- selectto xstart ystart
- backspace
- end
-